Fixes:
------

- Fix stat() on message queues.
  Addresses: https://cygwin.com/pipermail/cygwin/2025-January/257186.html

- Avoid deadlocks when calling message queue functions from different threads
  in the same process.
  Addresses: https://cygwin.com/pipermail/cygwin/2025-January/257120.html
